<?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

return array(
    //listo
    'controllers' => array(
        'invokables' => array(
            'Maestros\Controller\Index' => 'Maestros\Controller\IndexController',
            'Maestros\Controller\Persona' => 'Maestros\Controller\PersonaController',
            'Maestros\Controller\Nacionalidad' => 'Maestros\Controller\NacionalidadController',
            'Maestros\Controller\Sexo' => 'Maestros\Controller\SexoController',
            'Maestros\Controller\EstadoCivil' => 'Maestros\Controller\EstadoCivilController',
            'Maestros\Controller\Discapacidad' => 'Maestros\Controller\DiscapacidadController',
            'Maestros\Controller\Ocupacion' => 'Maestros\Controller\OcupacionController',
            'Maestros\Controller\Pais' => 'Maestros\Controller\PaisController',
            'Maestros\Controller\Estado' => 'Maestros\Controller\EstadoController',
            'Maestros\Controller\Ciudad' => 'Maestros\Controller\CiudadController',
            'Maestros\Controller\Municipio' => 'Maestros\Controller\MunicipioController',
            'Maestros\Controller\Parroquia' => 'Maestros\Controller\ParroquiaController',
            'Maestros\Controller\CondicionMateria' => 'Maestros\Controller\CondicionMateriaController',
            'Maestros\Controller\EstadoOrganizacionSeccion' => 'Maestros\Controller\EstadoOrganizacionSeccionController',
            'Maestros\Controller\CuposSeccion' => 'Maestros\Controller\CuposSeccionController',
            'Maestros\Controller\Especialidad' => 'Maestros\Controller\EspecialidadController',
            'Maestros\Controller\Dia' => 'Maestros\Controller\DiaController',
            'Maestros\Controller\Turno' => 'Maestros\Controller\TurnoController',
            'Maestros\Controller\Malla' => 'Maestros\Controller\MallaController',
            'Maestros\Controller\NivelMalla' => 'Maestros\Controller\NivelMallaController',
            'Maestros\Controller\Hora' => 'Maestros\Controller\HoraController',
            'Maestros\Controller\Pensum' => 'Maestros\Controller\PensumController',
            'Maestros\Controller\Materia' => 'Maestros\Controller\MateriaController',
            'Maestros\Controller\PeriodoFase' => 'Maestros\Controller\PeriodoFaseController',
            'Maestros\Controller\TrayectoSemestre' => 'Maestros\Controller\TrayectoSemestreController',
            'Maestros\Controller\Hora' => 'Maestros\Controller\HoraController',
            'Maestros\Controller\Bloque' => 'Maestros\Controller\BloqueController',
            'Maestros\Controller\MateriaEje' => 'Maestros\Controller\MateriaEjeController',
            'Maestros\Controller\Aula' => 'Maestros\Controller\AulaController',
            'Maestros\Controller\Horario' => 'Maestros\Controller\HorarioController',
            'Maestros\Controller\EstadoAlumno' => 'Maestros\Controller\EstadoAlumnoController',
            'Maestros\Controller\Seccion' => 'Maestros\Controller\SeccionController'
            ),
    ),
    
    'router' => array(
        'routes' => array(
            'home' => array(
                'type' => 'Zend\Mvc\Router\Http\Literal',
                'options' => array(
                    'route'    => '/',
                    'defaults' => array(
                        'controller' => 'Maestros\Controller\Index',
                        'action'     => 'index',
                    ),
                ),
            ),
            // The following is a route to simplify getting started creating
            // new controllers and actions without needing to create a new
            // module. Simply drop new controllers in, and you can access them
            // using the path /maestros/:controller/:action
            'maestros' => array(
                'type'    => 'Literal',
                'options' => array(
                    'route'    => '/maestros',
                    'defaults' => array(
                        '__NAMESPACE__' => 'Maestros\Controller',
                        'controller'    => 'Index',
                        //ojo creo que no va pero sin eso se va a un metodo de 
                        //getlist que no exite en el controlador index
                        //'action'        => 'index',
                    ),
                ),
                'may_terminate' => true,
                'child_routes' => array(
                    'default' => array(
                        'type'    => 'Segment',
                        'options' => array(
                            'route'    => '/:controller[/:id][/:param1][/:param2][/:param3]',
                            //'route'    => '/[:controller[/:action[/:id]]]',
                            //'route'    => '/[:controller[/:action[/:id/:id2]]]',
                            'constraints' => array(
                                'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'id'         => '[0-9a-zA-Z]+',
                            ),
                            'defaults' => array(
                            ),
                        ),
                    ),
//                    'getlist' => array(
//                        'type'    => 'Segment',
//                        'options' => array(
//                            'route'    => '/:controller[/:id][/:param1][/:param2][/:param3][/:param4][/:param5][/:param6]',
//                            'constraints' => array(
//                                'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
////                                'id'         => '[0-9a-zA-Z]+',
//                            ),
//                            'defaults' => array(
//                            ),
//                        ),
//                    ),
                ),
//                'child_routes' => array(
//                    'default' => array(
//                        'type'    => 'Segment',
//                        'options' => array(
//                            //'route'    => '/[:controller[/:action]]',
//                            'route'    => '/[:controller[/:action[/:param1][/:param2][/:param3]]]',
//                            //'route'    => '/[:controller[/:action[/:id]]]',
//                            //'route'    => '/[:controller[/:action[/:id/:id2]]]',
//                            'constraints' => array(
//                                'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
//                                'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
//                            ),
//                            'defaults' => array(
//                            ),
//                        ),
//                    ),
//                ),
            ),
        ),
    ),
    //listo
    'service_manager' => array(
        'factories' => array(
            'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory',
        ),
    ),
    //listo
    'translator' => array(
        'locale' => 'en_US',
        'translation_file_patterns' => array(
            array(
                'type'     => 'gettext',
                'base_dir' => __DIR__ . '/../language',
                'pattern'  => '%s.mo',
            ),
        ),
    ),

     'view_manager' => array( //Add this config
        'strategies' => array(
            'ViewJsonStrategy',
        ),
    ),
    //listo
//    'view_manager' => array(
//        'display_not_found_reason' => true,
//        'display_exceptions'       => true,
//        'doctype'                  => 'HTML5',
//        'not_found_template'       => 'error/404',
//        'exception_template'       => 'error/index',
//        'template_map' => array(
//            'layout/layout'           => __DIR__ . '/../view/layout/layout.phtml',
//            'maestros/index/index' => __DIR__ . '/../view/maestros/index/index.phtml',
//            'error/404'               => __DIR__ . '/../view/error/404.phtml',
//            'error/index'             => __DIR__ . '/../view/error/index.phtml',
//        ),
//        'template_path_stack' => array(
//            __DIR__ . '/../view',
//        ),
//    ),
);
